import request from '@/utils/request'

// 企业用户
export function fetchBusinessUsersList(query) {
  return request({
    url: '/yunwu-demo/userServiceData/businessUsers/list',
    method: 'get',
    params: query
  })
}

export function getBusinessUsersDetail(id) {
  return request({
    url: '/yunwu-demo/userServiceData/businessUsers/detail',
    method: 'get',
    params: { id }
  })
}

export function createBusinessUsers(data) {
  return request({
    url: '/yunwu-demo/userServiceData/businessUsers/create',
    method: 'post',
    data
  })
}

export function updateBusinessUser(data) {
  return request({
    url: '/yunwu-demo/userServiceData/businessUsers/update',
    method: 'post',
    data
  })
}

// 个人用户
export function fetchPersonalUserList(query) {
  return request({
    url: '/yunwu-demo/userServiceData/personalUsers/list',
    methods: 'get',
    params: query
  })
}
export function createPersonalUserInfo(data) {
  return request({
    url: '/yunwu-demo/userServiceData/personalUsers/create',
    method: 'post',
    data
  })
}

export function updatePersonalUserInfo(data) {
  return request({
    url: '/yunwu-demo/userServiceData/personalUsers/update',
    method: 'post',
    data
  })
}
// 认证数据
export function getUserServiceAuthData(params) {
  return request({
    url: '/yunwu-demo/userServiceData/authData/list',
    method: 'get',
    params
  })
}
